<style lang="less" scoped>
.jianjie{
    .mulu_data{
        width: 61vw;
        background: white;
        padding-left: 0.5vw;
        padding-right: 0.5vw;
        width: 61vw;
        margin-left: 18.5vw;
        .jianjieimg{
            width: 100%;
        }
    }
}


</style>
<template>
  <div class="jianjie">
    <MainUser></MainUser>
    <div style="height:3.2vw"></div>
    <affix style="margin-top:-3.2vw">
      <MainTitle @sousuo="titleSousuo" ref="maintitle"></MainTitle>
    </affix>
    
    <div class="mulu_data">
        <div style="height:0.5vw;"></div>
        <img class="jianjieimg"></img>
        <el-image
            class="jianjieimg"
            :src="imgdata"
            :fit="'cover'" ></el-image>
        <div style="height:5vw;"></div>
    </div>
    
  </div>
</template>
<script>
import { manuallist } from '@/request/api';
import MainTitle from '../main_title'
import MainUser from '../main_user'
export default {
    data() {
        return {
            imgdata:require("../../../images/jianjie1.jpg"),
            manuals:[
            ],
            pagintion: {
              total: 0,
              page_size:50,
              page: 1,
            },
            loading:false,
            pagesizes: [30,50,100],
            keywords:'',
        }
    },
    mounted() {
      if(this.$route.query.keywords != undefined){
        this.keywords = this.$route.query.keywords;
        this.$refs.maintitle.setinput2(this.keywords);
      }
      this.getmanuallist();
    },
    methods: {
      downmanual(id){
        let routeUrl = this.$router.resolve({
          path: 'jlb_manualdata',
          query: {'id': id}
        });
        window.open(routeUrl.href, '_blank');
      },
      //翻页
      handleCurrentChange(val) {
        this.pagintion.page = val;
        this.getmanuallist();
      },
      //修改条数
      handleSizeChange(val){
        this.pagintion.page_size = val;
        this.getmanuallist();
      },

      //获取C经典案例列表数据
      getmanuallist(){
          var param = {};
          param.page = this.pagintion.page;
          param.size = this.pagintion.page_size;
          param.keywords = this.keywords;
          this.loading = true;
          manuallist(param).then(res => {
            this.loading = false;
            if(res.ok){
                this.manuals = res.data.data;
                this.pagintion.total = res.data.total;
            }
          })
      },
      titleSousuo(keywords){
        this.keywords = keywords;
        this.getmanuallist();
      }
    },
    components: {
        MainTitle,
        MainUser
    },

}
</script>
